\chapter{Final Architecture}
\section*{Context Diagram}
The context diagram shows the interaction with systems outside the ReMeS system. We have human actors that interact with the portal node. The non human services interact with the incoming and outgoing nodes, the UIS node and the third party node.
\begin{figure}[h]
  \centering
    \includegraphics[width=\textwidth]{addRuns/Context.png}
  \caption{Context Diagram}
  \label{contextDiagram}
\end{figure}
\section*{Deployment Diagram}
There are different nodes. One node in the center takes care of the database interface and there is communication with almost all other nodes. Since we use active replication it is geographically desirable to place the database replica's on different nodes. We have a node dedicated for the interaction with the third party services. A node that is in charge of the portals. Two different nodes for the incoming communication and outgoing communication. We also have a node for the UIS. The prediction node holds the services for statistics, for missing measurements checker and for the consumption prediction calculation. And then there is the processor node for the command sender, data processor and anomaly detection. All the nodes communicate over SOAP, because SOAP is not java dependent (like RMI). The communication with the databases is JDBC.
\begin{figure}[h]
  \centering
    \includegraphics[width=\textwidth]{addRuns/DeploymentDiagram.png}
  \caption{Deployment Diagram}
  \label{deploymentDiagram}
\end{figure}
\section*{Final Architecture Diagram}
For an explanation of all the different components, we reference to the Element Catalog.
\begin{figure}[b]
  \centering
    \includegraphics[width=\textwidth, angle=90]{addRuns/FinalDiagram.png}
  \caption{Final Architecture}
  \label{finalArchitecture}
\end{figure}
